import { Component } from "@angular/core";
import { ModalController } from "@ionic/angular";
import { Global } from "../../services/global.service";

@Component({
	selector: "app-choose-language",
	templateUrl: "./choose-language.page.html",
	styleUrls: ["./choose-language.page.scss"],
})
export class ChooseLanguagePage {


	constructor(
		private modalCtrl: ModalController,
		private global: Global) { }

	async dismiss() {
		await this.modalCtrl.dismiss();
	}

	choose(language: string) {
		this.global.chooseLanguage(language);
		this.dismiss();
	}

	translate(key: string) {
		return this.global.translate(key);
	}

}
